<template>
  <div class="login">
    <div class="box">
      <div class="box1"></div>
      <el-form
        :model="ruleForm"
        status-icon
        :rules="rules"
        ref="refForm"
        label-width="100px"
        class="demo-ruleForm"
      >
        <el-form-item label="用户名" prop="username">
          <el-input v-model="ruleForm.username" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="密码" prop="password">
          <el-input
            type="password"
            v-model="ruleForm.password"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="dl">登录</el-button>
          <el-button >重置</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  name: "loginIndex",
  data() {
    return {
      ruleForm: {
        username: "admin",
        password: "123456",
      },
      rules: {
        username: [{ required: true, message: "请输入用户名", tigger: "blur" }],
        password: [{ required: true, message: "请输入用户名", tigger: "blur" }],
      },
    };
  },
  methods: {
    dl() {
        this.$router.push('/layout')
    },
  },
};
</script>

<style scoped lang="scss">
.login {
  width: 100vw;
  height: 100vh;
  background: url(../assets/bjt.jpg) no-repeat;
  background-size: 100%, 100%;
  padding-top: 300px;
  box-sizing: border-box;
  .box {
    width: 500px;
    height: 350px;
    margin: auto;
    // background-color: #2b4b6b;
    position: relative;
    padding-top: 120px;
    .box1 {
      width: 150px;
      height: 150px;
      background: url(../assets/R-C.png) no-repeat;
      background-size: 100%, 100%;
      position: absolute;
      top: -80px;
      left: 35%;
      border-radius: 50%;
    }
  }
}
</style>